<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<title>分类树列表</title>
		<link rel="stylesheet" href="/include/manage/zTreeStyle/zTreeStyle.css" type="text/css">
<script type="text/javascript" src="/include/manage/js/jquery.js"></script>
<script type="text/javascript" src="/include/manage/js/jquery-ztree.js"></script>
<SCRIPT LANGUAGE="JavaScript">
<!--
$.ajaxSetup ({
	cache: false
}); 

function clone(jsonObj, newName) {
    var buf;
    if (jsonObj instanceof Array) {
        buf = [];
        var i = jsonObj.length;
        while (i--) {
            buf[i] = clone(jsonObj[i], newName);
        }
        return buf;
    }else if (typeof jsonObj == "function"){
        return jsonObj;
    }else if (jsonObj instanceof Object){
        buf = {};
        for (var k in jsonObj) {
	        if (k!="parentNode") {
	            buf[k] = clone(jsonObj[k], newName);
	            if (newName && k=="name") buf[k] += newName;
	        }
        }
        return buf;
    }else{
        return jsonObj;
    }
}
  
	var zTree1;
	var setting;

	setting = {
		async: true,
		asyncUrl: "/include/manage/getTreeList.jsp",
		asyncParam: ["name", "id"],
    	checkable : true,
    	checkStyle : "$!checkStyle",
		checkRadioType : "all",
		callback : {
		  click: zTreeOnClick
		}
	};

	var zNodes =[];

	$(document).ready(function(){
		refreshTree();
	});

	function refreshTree() {
		zTree1 = $("#treeList").zTree(setting);
	}
	
	function zTreeOnClick(event, treeId, treeNode){
		//zTree1.selectNode(treeNode);
		//var srcNode = zTree1.getSelectedNode();
		treeNode.checked = true;
		zTree1.updateNode(treeNode, true);
	}
  //-->
</SCRIPT>
<style type="text/css">
body {
 padding: 0px;
 margin: 0px;
 font-size:12px;
}
#treeList {
	margin:3px;
	width:366px;
	height:148px;
	border:1px solid #b5d6e6;
	overflow-x:hidden;
	overflow-y:auto;
}
.tree{padding:0;}
</style>
	</head>
	<body>
        <div id="treeList" class="tree" style="float:left"></div>
	</body>
</html>